<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 
class User_Model extends Model 
{
	private $user="";
	function User_Model()
    {
        parent::Model();
    }
	function check_login($username,$pass,$rememberme='')
	{

		$this->db->like('username', $username);
		$this->db->like('password', $pass); 
		$query = $this->db->get('admin');
		return $query;
	}
	function change_password($user_ID,$newpassword)
	{
		$data['password']=md5($newpassword);
		$this->db->where('admin_id',$user_ID);
		$result=$this->db->update('admin',$data);
			if ($result) 
			{
				return 1;
			} 
			else 
			{
				return 0;
			}

	}
}
